#include <iostream>
#include <fstream>
#include <math.h>
using namespace std;

#include "fir_1x.h"

void fir_1x_test()
{
	std::ofstream result("result_1x.txt");

	static t_input_scalar data_in[RUN_LENGTH];
	float f1= 0.01;
	float f2= 0.2;

	for (int i= 0;i<RUN_LENGTH;i++) {
		data_in[i] = t_input_scalar(0.5*cos(2*3.14*f1*i)+0.5*cos(2*3.14*f2*i));
	}

//	for (int i= 0;i<RUN_LENGTH;i++) {
//		cout << data_in[i] << endl;
//	}

	for (int i= 0;i<FIR_TAP_NUM;i++) {
		cout << coe[i] << endl;
	}

	for (int i= 0;i<RUN_LENGTH;i++) {
		t_input_scalar din=data_in[i];
		t_output_scalar dout;
		fir_1x ( din,  dout);
		result << dout << endl;
	}

	result.close();
}

int main()
{
	fir_1x_test();

	return 0;
}

